// 数据模型层
use chrono::{DateTime, FixedOffset};
use serde::{Deserialize, Serialize};

#[derive(Debug, Serialize, Deserialize)]
pub struct EnvironmentData {
    pub id: i32,
    pub temperature: f32,
    pub humidity: f32,
    #[serde(skip_deserializing)]
    pub timestamp: Option<DateTime<FixedOffset>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct CreateEnvironmentData {
    pub temperature: f32,
    pub humidity: f32,
}

